﻿using IRepositoryDal;
using Microsoft.EntityFrameworkCore;
using RepositoryEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RepositoryDal
{
    public class RoleInfoDal : BaseDal<RoleInfo>, IRoleInfoDal
    {
        //数据库上文
        RepositoryDbContext _DbContext;

        public RoleInfoDal(RepositoryDbContext DbContext) : base(DbContext)
        {
            _DbContext = DbContext;
        }

        //public void Delete(List<RoleInfo> deleteEntityInfos)
        //{
        //    throw new NotImplementedException();
        //}

        //public void Delete(List<RoleInfo> deleteEntityInfos)
        //{
        //    throw new NotImplementedException();
        //}


        /// <summary>
        /// 根据id获取角色信息
        /// </summary>
        /// <param name="roleInfoId">角色id</param>
        /// <returns></returns>
        //public RoleInfo GetRoleInfo(string roleInfoId)
        //{
        //    RoleInfo roleInfo = _DbContext.RoleInfo.FirstOrDefault(u => u.ID == roleInfoId);
        //    return roleInfo;
        //}

        /// <summary>
        /// 获取角色集合
        /// </summary>
        /// <returns></returns>
        //public List<RoleInfo> GetRoleInfos()
        //{
        //    return _DbContext.RoleInfo.ToList();
        //}

        //public DbSet<RoleInfo> GetRoleInfosDb()
        //{
        //    return _DbContext.RoleInfo;
        //}

        //public bool UpdateRoleInfo(RoleInfo roleInfo)
        //{
        //    throw new NotImplementedException();
        //}
    }
}
